package net.colah.k1.application.dto;

import java.io.Serializable;

import org.springframework.format.annotation.DateTimeFormat;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.openkoala.koala.springmvc.JsonTimestampSerializer;
import org.openkoala.koala.springmvc.JsonDateSerializer;


public class SupplierDTO implements Serializable {

    private Long id;


    private String site;


    private String meno;


    private String fax;


    private String email;


    private String address;


    private String tel;


    private String name;


    private String code;


    private String contact;


    private String mobile;




    public void setSite(String site) {
        this.site = site;
    }

    public String getSite() {
        return this.site;
    }




    public void setMeno(String meno) {
        this.meno = meno;
    }

    public String getMeno() {
        return this.meno;
    }




    public void setFax(String fax) {
        this.fax = fax;
    }

    public String getFax() {
        return this.fax;
    }




    public void setEmail(String email) {
        this.email = email;
    }

    public String getEmail() {
        return this.email;
    }




    public void setAddress(String address) {
        this.address = address;
    }

    public String getAddress() {
        return this.address;
    }




    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getTel() {
        return this.tel;
    }




    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return this.name;
    }




    public void setCode(String code) {
        this.code = code;
    }

    public String getCode() {
        return this.code;
    }




    public void setContact(String contact) {
        this.contact = contact;
    }

    public String getContact() {
        return this.contact;
    }




    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getMobile() {
        return this.mobile;
    }


    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((id == null) ? 0 : id.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        SupplierDTO other = (SupplierDTO) obj;
        if (id == null) {
            if (other.id != null)
                return false;
        } else if (!id.equals(other.id))
            return false;
        return true;
    }

    public String getTelMobile() {
        return StringUtils.join(new String[]{tel, mobile},  ",");
    }
}